package homeWork.Three.demo1;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2022-11-30
 * Time: 16:57
 */
public class TestDemo {
    //1. (简答题) 自定义一个字符串数组，提示用户输入5个字符串，
    // 通过循环语句实现将用户输入的字符串存放到数组中，饭后反向输出这5个字符串。
    public static void main(String[] args) {
        String[] str = new String[5];
        Scanner scanner = new Scanner(System.in);
        for(int i =0;i<5;++i){
            str[i] = scanner.nextLine();
        }
        for(int i =4;i>=0;--i){
            System.out.print(str[i] + " ");
        }
    }
}
